# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
maintainer="team/kde <bribbers@disroot.org>"
pkgname=kruler
pkgver=24.08.2
pkgrel=0
pkgdesc="An on-screen ruler for measuring pixels"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://kde.org/applications/graphics/org.kde.kruler"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	kdoctools-dev
	ki18n-dev
	knotifications-dev
	kstatusnotifieritem-dev
	kwindowsystem-dev
	kxmlgui-dev
	qt6-qtbase-dev
	samurai
	"
subpackages=" $pkgname-lang"
_repo_url="https://invent.kde.org/graphics/kruler.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kruler-$pkgver.tar.xz"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
9f86eff108af58d27333abaec5c70b54c13b478c1326fe393e5086cc5259b779086699f77b3b6e8d4c394615da8f4c85a1d01f6644e464bf785d1261925816b1  kruler-24.08.2.tar.xz
"
